home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 127
/
127.d81
/
b.file cpr
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
145 lines
10 dv=peek(186):ifdv<8thendv=8
20 dima$(255),g$(16):bk$=" [146]"
30 fori=1to16:s$=s$+chr$(160):next
40 print"[147][159]":poke53280,0:poke53281,0
50 ty$(1)="[211][197][209]":ty$(2)="[208][210][199]":ty$(3)="[213][211][210]":ty$(4)="[210][197][204]":ty=2
60 nd$="":fori=1to16:nd$=nd$+chr$(0):next
70 dt$(0)="1541/1571 type directory"
80 dt$(1)="1581 type directory "
90 dt$(2)="[195][205][196] [206]ative mode directory"
100 td(0)=18:sd(0)=1
110 td(1)=40:sd(1)=3
120 td(2)=1:sd(2)=34
130 goto740
140 :
150 :rem print at
160 :
170 poke211,x:poke214,y:sys58732:return
180 :
190 :rem read disk
200 :
210 open15,dv,15,"i0":gosub580
220 open1,dv,2,"#":gosub580
230 t=td(dt):s=sd(dt)
240 print#15,"u1:";2;0;t;s:gosub580
250 fori=0to255
260 get#1,a$(i):ifa$(i)=""thena$(i)=chr$(0)
270 next
280 f=0
290 b=32*f+4:ff$=""
300 fori=1to16
310 ff$=ff$+a$(b+i):next
320 ifasc(a$(b-2))=0then1140
330 f=f+1:iff<8then290
340 t=asc(a$(0)):ift=0then1340
350 s=asc(a$(1)):goto240
360 print"[147][150] [215][160][193][160][210][160][206][160][201][160][206][160][199][160]![160]![160]"
370 print"[159] [196]o not turn off drive
380 [153]" until activity light is off!
390 print"[158] [208]lease press a key."
400 wait198,1
410 :
420 :rem write right here
430 :
440 b=b-2:print#15,"b-p:";2;b
450 print#1,chr$(128+ty);
460 print#15,"u2:";2;0;t;s:gosub580
470 print:print:print"[159][214]alidating disk ...."
480 print#15,"v":gosub580
490 close1:close15
500 print"[147] "ff$"[159] has been revived!
510 [153]" (NULL)se a copier to transfer it to
520 print" another disk. [208]ress a key.
522 [151]198,0
530 [161]a$:[139]a$[178]""[167]530
540 [138]
550 :
560 :[143] read error
570 :
580 [132]15,en,em$,et,es
590 [139]en[178]0[167][142]
600 [153]"loaddef"em$:[160]1:[160]15
610 [153]"open (NULL)esuscitation failed because of the "
620 [153]" error. right$f you can correct the error"
630 [153]" run the program again."
640 [153]" right$f error occurred during validating,"
650 [153]" check directory. right$f file name is"
660 [153]" there, file may be ok. (NULL)ry it."
670 [153]" right$f it works, copy it to another"
680 [153]" disk. (NULL)ress a key."
682 [151]198,0
690 [161]a$:[139]a$[178]""[167]690
700 [138]
710 :
720 :[143] start screen
730 :
740 [153]"loadlist (NULL)atn(NULL)(NULL)right$lenval mid$(NULL)(NULL)val(NULL)' (NULL)&str$ ascright$(NULL)val len(NULL)(NULL)
750 print:print"[159] [212]his program writes to the disk."
760 print" [217]ou should be working with a [195][207][208][217]
770 [153]"open of the disk which has a scratched
780 print" file you want unscratched.
800 [153]"list lenontinue? (ylist/nlist)"
810 [161]a$:[139]a$[178]""[167]810
820 [139]a$[178]"y"[176]a$[178]"(NULL)"[167]940
830 [153]"open (NULL)o try again enter (NULL)(NULL)(NULL).":[128]
940 [153]"load"
950 [153]"list (NULL)elect drive to be used"
960 [153]" 1.open (NULL)oggle str$evice # sys cmdcmdcmd"dv
970 [153]" 2.open atnccept
980 print" 3.[159] [209]uit
990 [161]a$:[139]a$[178]""[167]990
1000 [139]a$[179]"1"[176]a$[177]"3"[167]990
1010 [145][197](a$)[137]1020,1040,830
1020 dv[178]dv[170]1:[139]dv[178]17[167]dv[178]8
1030 [137]950
1040 [153]"list (NULL)lace disk in drive"dv
1050 [153]"list and press any key.
1060 geta$:ifa$=""then1060
1070 gosub1380
1080 print"[155] [212]his will take a while.
1090 [153]"def (NULL)(NULL)valatn(NULL)valclosepeekvalclose(NULL)atn(NULL)right$val(NULL)(NULL)!!!
1100 goto210
1110 :
1120 :rem is this it?
1130 :
1140 ifff$=nd$then330
1150 print"[147][159] "ff$
1160 print:print"[155] [201]s this the file? (y[155]/n[155])
1170 [161]a$:[139]a$[178]""[167]1170
1180 [139]a$[178]"y"[176]a$[178]"(NULL)"[167] 1210
1190 [139]a$[178]"n"[176]a$[178]"(NULL)"[167][153]"load":[137]330
1200 [137]1170
1210 [153]"load"
1220 [153]"list (NULL)elect file type
1230 print" 1.[159] [212]oggle type [158]"ty$(ty)
1240 print" 2.[159] [193]ccept
1250 [153]" 3.open (NULL)uit
1260 geta$:ifa$=""then1260
1270 ifa$<"1"ora$>"3"then1260
1280 onval(a$)goto1290,360,830
1290 ty=ty+1:ifty=05thenty=1
1300 goto1220
1310 :.
1320 :rem no more files
1330 :
1340 print"[147][155] [212]here are no more deleted files.":close1:close15:goto830
1350 :
1360 :rem check drive type
1370 :
1380 open2,dv,2,"$"
1390 get#2,a$
1400 close2
1404 ka=ka+1:ifka=1then1380
1410 ifa$="a"thendt=0:goto1440
1420 ifa$="d"thendt=1:goto1440
1430 ifa$="h"thendt=2:goto1440
1434 goto1470
1440 print"[159] [196]rive"dv"contains a "
1450 print:print" "dt$(dt):print
1460 return
1470 print"[147] [150][197]rror!!![155] [196]irectory type unkown."
1490 print" [208]ress a key to start over.
1500 [161]a$:[139]a$[178]""[167]1500
1510 [138]
10000 dv[178][194](186):[159]15,dv,15,"s0:file cpr":[160]15:[148]"file cpr",dv:[128]